<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>css动画原理</title>
	<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
	<style>
		@keyframes bounce-in {
			0% {
				transform: scale(0);
			}
			50% {
				transform: scale(1.5);
			}
			100% {
				transform: scale(1);
			}
		}
		.active {
			transform-origin:left center;
			animation: bounce-in 1s;
		}

		.leave {
			transform-origin:left center;
			animation: bounce-in 1s reverse;
		}
	</style>
</head>
<body>
	<div id="app">
		<transition enter-active-class="active" leave-active-class="leave">
			<div v-if="show">Hello Vue</div>
		</transition>		
		<button @click="handleClick">change</button>
	</div>
	
	<script>

		new Vue({
			el: "#app",
			data: {
				show: true
			},
			methods: {
				handleClick: function() {
					this.show = !this.show
				}
			}
		})
	</script>
</body>
</html>